﻿package com.wxsoft.business.sale.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wxsoft.business.model.easyui.PageHelper;

import com.wxsoft.business.sale.dao.ISlPayLogDao;
import com.wxsoft.business.sale.service.ISlPayLogService;
import com.wxsoft.business.sale.pojo.SlPayLog;

@Service("slPayLogService")
public class SlPayLogServiceImpl implements ISlPayLogService  {
	@Resource
	private ISlPayLogDao dao;
	
	
	public long findCount(SlPayLog slPayLog) {
		return dao.findCount(slPayLog);
	}
	
	public List<SlPayLog> findAll(PageHelper page,SlPayLog slPayLog) {
        List<SlPayLog> r = dao.findAll(page,slPayLog);
		return r;
	}
	public List<SlPayLog> getBy(SlPayLog slPayLog) {
        List<SlPayLog> r = dao.getBy(slPayLog);
		return r;
	}
	@Transactional
	public String add(SlPayLog slPayLog) {
		int r = this.dao.insert(slPayLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String modify(SlPayLog slPayLog) {
		int r = this.dao.modify(slPayLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	@Transactional
	public String delete(SlPayLog slPayLog) {
		int r = this.dao.delete(slPayLog);
		if(r==1){
			return "操作成功!";
		}
		return "操作失败!";
	}
	
}
